package com.itany.corejava.code07_面向对象.继承;

/**
 * @author: 石小俊
 * @date: 2023年03月08日 9:31
 * @version: 1.0
 */
public class Man extends Person {
    private double salary;

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public void work(){
        System.out.println("我是一个男人,我需要赚钱养家,我每个月能赚"+salary+"元");
    }
}
